package net.guerlab.credits.usercredits.service.impl;

import java.util.List;

import net.guerlab.credits.usercredits.dqi.UserCreditsDQI;
import net.guerlab.credits.usercredits.entity.UserCredits;
import net.guerlab.credits.usercredits.entity.UserCreditsSearchParams;
import net.guerlab.credits.usercredits.service.UserCreditsService;

/**
 * 用户积分服务接口简单实现类
 * 
 * @author guer
 *
 */
public class UserCreditsServiceImpl implements UserCreditsService {

    private static final long serialVersionUID = 1L;

    /**
     * 用户积分数据查询接口
     */
    private UserCreditsDQI userCreditsDQI;

    /**
     * 设置用户积分数据查询接口
     * 
     * @param userCreditsDQI
     *            用户积分数据查询接口
     */
    public final void setUserCreditsDQI(UserCreditsDQI userCreditsDQI) {
        this.userCreditsDQI = userCreditsDQI;
    }

    @Override
    public UserCredits findOne(UserCreditsSearchParams searchParams) {
        return userCreditsDQI.findOne(searchParams);
    }

    @Override
    public List<UserCredits> findList(UserCreditsSearchParams searchParams) {
        return userCreditsDQI.findList(searchParams);
    }

    @Override
    public int findCount(UserCreditsSearchParams searchParams) {
        return userCreditsDQI.findCount(searchParams);
    }

    @Override
    public void save(UserCredits userCredits) {
        userCreditsDQI.save(userCredits);
    }

    @Override
    public void update(UserCredits userCredits) {
        userCreditsDQI.update(userCredits);
    }

    @Override
    public void delete(UserCredits userCredits) {
        userCreditsDQI.delete(userCredits);
    }

}
